/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVASE Song Huongkang PROJECT
 * All Rights Reserved.
 */

package 练习.工资系统;

public class HourlyEmployee extends Employee{

    private int wage;// 每小时工资
    private int hour;// 月工作时数

    public HourlyEmployee(String name, int number, MyDate birthday, int wage, int hour) {
        super(name, number, birthday);
        this.wage = wage;
        this.hour = hour;
    }


    @Override
    public int earning() {
        return wage*hour;
    }

    @Override
    public String toString() {
        return "HourlyEmployee{"+super.toString();
    }
}
